package controller;

import view.*;
import controller.eventListeners.*;

public class MainController {
	
	private static MainController instance;
	private ParentFrame parentFrame;
	
	private MainController() {
		parentFrame = ParentFrame.getInstance();
		addListeners();
		parentFrame.setVisible(true);
	}
	
	public static MainController getInstance() {
		if (instance == null) {
			instance = new MainController();
		}
		return instance;
	}
	
	private void addListeners() {
		parentFrame.getCreateRecordButton().addActionListener(new CreateRecordButtonActionListener());
	}
	
	public void CreateRecordController() {
		controller.CreateRecordController.getInstance().showRecordView();
	}
	
}
